package cn.waqwb.service.impl;

import cn.waqwb.mapper.UserMapper;
import cn.waqwb.mapper.impl.UserMapperImpl;
import cn.waqwb.pojo.Users;
import cn.waqwb.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Classname UserServiceImpl
 * @Description TODO
 * @Date 2022/9/6 20:39
 * @Created by Administrator
 */
@Service  //交给spring框架去创建业务逻辑层对象
public class UserServiceImpl implements UserService {
    //切记：在所有的业务层逻辑中都必须有数据访问层对象
//    private UserMapper userMapper = new UserMapperImpl();
    @Autowired
    private UserMapper userMapper;
    @Override
    public int insert(Users users) {
        return userMapper.insert(users);
    }
}
